package com.zy.cat.entity.dev.act;


import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.IdClass;
import javax.persistence.Index;
import javax.persistence.Table;

import com.fasterxml.jackson.annotation.JsonInclude;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import com.fasterxml.jackson.annotation.JsonInclude.Include;
import com.zy.cat.entity.primary.APPActDBHistoryPrimary;

import lombok.NoArgsConstructor;

/**
 * 
 * @info 线上推广开发者大转盘实体类
 * @author Link
 * @date 2020-03-18 17:06
 */
@Entity
@Table(name = "zy_cat_user_db_history", indexes = {
		@Index(name = "sid", columnList = "sid"),
		@Index(name = "dstatus", columnList = "dstatus")})
@Data
@AllArgsConstructor
@NoArgsConstructor
@ApiModel("线上推广开发者免费抽信息实体类")
@IdClass(APPActDBHistoryPrimary.class)
public class APPActDBHistory {
	
	@Id
	@Column(columnDefinition = "VARCHAR(11) NOT NULL COMMENT '商品ID'")
	@ApiModelProperty(value = "商品ID", example = "18986866666")
	private String sid = "";

	@Column(columnDefinition = "VARCHAR(32) NOT NULL COMMENT '用户ID'")
	@ApiModelProperty(value = "用户ID" )
	private String pid = "";
	
	@Id
	@Column(columnDefinition = "INT(1) DEFAULT '1' COMMENT '开奖期数（叠加）'")
	@ApiModelProperty(value = "开奖期数（叠加）", example = "0")
	private int cindex;

	@Id
	@Column(columnDefinition = "BIGINT(11) NOT NULL COMMENT '免费抽券ID'")
	@ApiModelProperty(value = "免费抽券ID", example = "505685856")
	private long qid;
	
	@Column(columnDefinition = "INT(2) DEFAULT '0' COMMENT '用户类型（0.机器人、1.真人）'")
	@ApiModelProperty(value = "用户类型（0.机器人、1.真人）", example = "0")
	private int utype;

	@Column(columnDefinition = "INT(2) DEFAULT '0' COMMENT '进度（0.开奖中、1.未中奖、2.已中奖）'")
	@ApiModelProperty(value = "进度（0.开奖中、1.未中奖、2.已中奖）", example = "0")
	private int dstatus;
	
	@Column(columnDefinition = "VARCHAR(20) DEFAULT '-'  COMMENT '中奖者手机'")
	@ApiModelProperty(value = "中奖者手机", example = "138****7586")
	private String phone;
	
	@Column(columnDefinition = "VARCHAR(20) DEFAULT '-'  COMMENT '创建时间'")
	@ApiModelProperty(value = "创建时间", example = "2019-02-22")
	private String ctime = "";
	
	@Column(columnDefinition = "VARCHAR(20) DEFAULT '-'  COMMENT '最后更新时间'")
	@ApiModelProperty(value = "最后更新时间", example = "2019-02-22 12:56:56")
	private String ltime;

	public APPActDBHistory(String sid, String pid, int cindex, long qid, int utype, String ctime, String ltime) {
		super();
		this.sid = sid;
		this.pid = pid;
		this.cindex = cindex;
		this.qid = qid;
		this.utype = utype;
		this.ctime = ctime;
		this.ltime = ltime;
	}
	
	
	

}
